{% extends "base_tables.html" %}

{% block content_title %}
  <a href="{{ url_for('index') }}">{{ dataset.base_name }}</a> &mdash; {{ table }}
{% endblock %}

{% block content %}
  <ul class="nav nav-tabs">
    <li class="nav-item">
      <a class="nav-link{% block content_tab_class %}{% endblock %}" href="{{ url_for('table_content', table=table) }}">内容</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block structure_tab_class %}{% endblock %}" href="{{ url_for('table_structure', table=table) }}">结构体</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block query_tab_class %}{% endblock %}" href="{{ url_for('table_query', table=table) }}">查询</a>
    </li>
    {% if not dataset.is_readonly %}
    <li class="nav-item ml-auto">
      <a class="nav-link{% block drop_tab_class %}{% endblock %}" href="{{ url_for('drop_table', table=table) }}">删除</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block import_tab_class %}{% endblock %}" href="{{ url_for('table_import', table=table) }}">导入</a>
    </li>
    {% endif %}
    {% block inner_nav %}{% endblock %}
  </ul>
  <div style="margin-top: 20px;">
    {% block inner_content %}
    {% endblock %}
  </div>
{% endblock %}
